# vim: ai ts=2 sts=2 et sw=2

import pygame
from pygame.locals import *

import utils

import widget
import container

class Window(widget.Widget):
  """
  The window class is a draggable, resizeable container.
  """

  def __init__(self, left, top, width, height, title, font):
    widget.Widget.__init__(self, left, top, width, height)
    
    self.title = title
    self.font = font

    self.titleSurface = self.font.render(title, 1, (255, 255, 255))
    print self.titleSurface.get_height()

  def onDraw(self, surface):
    pygame.draw.rect(surface, (255, 255, 255), self.screenRect, 1)
    surface.blit(self.titleSurface, self.screenRect)

  def onMouseButtonUp(self, event):
    return True
  
  def onMouseButtonDown(self, event):
    return True

